package com.yaosheng.thread.jvm;

/**
 * Created by yaosheng on 2021/7/9.
 */
public class ClassReload {

    public static void main(String[] args) throws ClassNotFoundException {

        MSBClassLoader msb = new MSBClassLoader ();
        Class clazz = msb.loadClass ("com.yaosheng.thread.jvm.Hello");

        msb = null;
        System.out.println (clazz.hashCode ());

        MSBClassLoader msbClassLoader = new MSBClassLoader ();
        Class clazz1 = msbClassLoader.loadClass ("com.yaosheng.thread.jvm.Hello");
        System.out.println (clazz1.hashCode ());

        System.out.println (clazz == clazz1);
    }
}
